package jmu.cze.mapper;

import jmu.cze.vo.Message;
import jmu.cze.vo.Note;
import jmu.cze.vo.Revert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NoteMapper {
    public List<Note> getNotes(@Param("index") int index, @Param("limit") int limit);
    public List<Note> searchNotes(@Param("kw") String keyword);
    public List<Message> getMessageByPage(@Param("id") int productID, @Param("index") int index, @Param("limit") int limit);
    public List<Revert> getRevertByMessageID(@Param("id") int messageId);
    public int countMessage();
    public int countRevert();
    public int updateMessage(Message message);
    public int addMessage(Message message);
    public int deleteMessage(@Param("id") int messageId);
    public int updateRevert(Revert revert);
    public int addRevert(Revert revert);
    public int deleteRevert(@Param("id") int revertId);
    public int deleteRevertByMessageID(@Param("id") int messageId);
    public String getWriter(String writerID);
    public String getMessageWriterID(@Param("id") int messageId);
    public String getRevertWriterID(@Param("id") int revertId);
}
